<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<button onclick="a()" >变化</button>
		<p></p>
		
		<script>
			function a()
			{
				let a =document.querySelector('p');
				a.innerText = '<h1>我爱你</h1>';
				a.innerHTML = '<h1>我爱你</h1>';
			}
		</script>
	</body>
</html>